package myStudent

import org.springframework.cloud.contract.spec.Contract

[Contract.make {
    name "should_return_BadRequest_unFollow"
    request {
        method 'DELETE'
        url value(consumer(regex('/api/myStudents/programs/\\d+/followers/\\d+')),
                producer('/api/myStudents/programs/1/followers/1'))
        headers {
            contentType(applicationJsonUtf8())
            header("id", 1)
        }
    }
    response {
        status 400
    }
},
 Contract.make {
     name "should_return_success_unFollow"
     request {
         method 'DELETE'
         url value(consumer(regex('/api/myStudents/programs/\\d+/followers/\\d+')),
                 producer('/api/myStudents/programs/1/followers/2'))
         headers {
             contentType(applicationJsonUtf8())
             header("id", 1)
         }
     }
     response {
         status 204
     }
 },

]